<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateStatisticPhoneRecordsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('statistic_phone_records', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('call_times')->nullable()->comment('回访总次数');
            $table->integer('visit_number')->nullable()->comment('被回访的人数');
            $table->integer('connect_number')->nullable()->comment('打通人数');
            $table->integer('login_number')->nullable()->comment('登录人数');
            $table->integer('charge_number')->nullable()->comment('充值人数');
            $table->integer('sms_count')->nullable()->comment('短信次数');
            $table->integer('sms_number')->nullable()->comment('短信人数');
            $table->tinyInteger('type')->unsigned()->default(0)->comment('0、单个客服 1、整体客服 2、部门客服 3、分支客服');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('statistic_phone_records');
    }
}
